Skip to main content

View Post [edit]

Poster: David Fifield Date: Feb 7, 2018 9:36am
Forum: movies Subject: "Uploaded content is unacceptable" when filename ends in ":.mp4"

I tried to upload a video file named 36. 2009-11-16 - Lecture 32:.mp4 and got this error:
400 Bad Data
Uploaded content is unacceptable. video file has improper extension, try one of these: .mp4 .mpeg4 .m4b .m4v

The problem seems to be the colon character immediately before the filename extension. I did a few tests with a dummy video file (just 5 seconds of blue background, attached) at
  • blue.mp4 ok

  • 1. blue.mp4 ok

  • blue:blue.mp4 ok

  • blue:.mp4 fails

  • blue::.mp4 ok

  • 1. blue:.mp4 fails

I can work around the error—I'm just reporting it because it seems like a bug, especially as the two-colon name blue::.mp4 works and the one-colon blue:.mp4 doesn't.

The error only seems to occur with an actual video file. Initially I was testing with files whose extension was .mp4 but which contained dummy text, and they uploaded without a problem. (Though obviously they didn't get derived.)

I get the error both with and with the internetarchive Python library. Here is the Python 2 script I tried:

import internetarchive
def report(reqs):
for r in reqs:
if r.ok:
print "OK"
print r.status_code, repr(r.text)
"collection": "test_collection",
"mediatype": "movies",
FILENAME = "blue.mp4"
IDENTIFIER = "TEST_filename_extension_movies3"
report(internetarchive.upload(IDENTIFIER, files=[
("blue.mp4", FILENAME),
("1. blue.mp4", FILENAME),
("blue:blue.mp4", FILENAME),
("blue::.mp4", FILENAME),
("blue:.mp4", FILENAME),
("1. blue:.mp4", FILENAME),
], metadata=METADATA, verbose=True, queue_derive=False))

Attachment: blue.mp4